﻿using Architecture.Domian.Entity;
using Architecture.Repository.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Architecture.Repository.Impl
{
    public class UserRepository : BaseRepository<UserInfo>, IUserRepository
    {
        public UserRepository(EFCoreDbContext dbContext) : base(dbContext)
        {
        }

        public async Task<int> AddAsync(UserInfo entity)
        {
            return await base.AddAsync(entity);
        }

        public async Task<List<UserInfo>> GetAllAsync()
        {
            return await base.GetAllAsync();
        }

        public async Task<List<UserInfo>> GetAsync(Expression<Func<UserInfo, bool>> expre)
        {
            return await base.GetAsync(expre);
        }

        public async Task<UserInfo> GetByFuncAsync(Expression<Func<UserInfo, bool>> expre)
        {
            return await base.GetByFuncAsync(expre);
        }

        public async Task<UserInfo> GetByIdAsync(int id)
        {
            return await base.GetByIdAsync(id);
        }

        public async Task<int> UpdateAsync(UserInfo entity)
        {
            return await base.UpdateAsync(entity);
        }
    }
}
